home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / ENTRPRIS / PASSTHRU / PASS_SVR.CLS < prev    next >
Encoding:
Text File  |  1996-11-23  |  736 b   |  34 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = 0   'False
  4. END
  5. Attribute VB_Name = "PassThruClass"
  6. Attribute VB_Creatable = True
  7. Attribute VB_Exposed = True
  8. Option Explicit
  9.  
  10. Public Function RunServer(rstrProgID As String, rbSuccess As Integer) As Object
  11. 'Note: This routine assumes PassThruClass has been created with SingleUse.
  12. 'Returns the handle to a requested server if rbSuccess = true, otherwise rbSuccess = false
  13.  
  14.   On Error GoTo csError
  15.  
  16.   Set RunServer = CreateObject(rstrProgID)
  17.   frmPassThru.labSvrProgID = rstrProgID
  18.   rbSuccess = True
  19.   GoTo csExit
  20.   
  21. csError:
  22.   DisplayError
  23.   Resume csExit
  24.   
  25. csExit:
  26. End Function
  27.  
  28. Private Sub DisplayError()
  29.   #If gbDEBUG2 Then
  30.     MsgBox Error$
  31.   #End If
  32. End Sub
  33.  
  34.